﻿using System;
using System.Collections.Generic;

namespace MyHomeworkWebAPi.Models;

public partial class Product
{
    /// <summary>
    /// 商品ID
    /// </summary>
    public Guid ProductId { get; set; }

    /// <summary>
    /// 发布者ID
    /// </summary>
    public Guid UserId { get; set; }

    /// <summary>
    /// 商品标题
    /// </summary>
    public string Title { get; set; } = null!;

    /// <summary>
    /// 价格
    /// </summary>
    public decimal Price { get; set; }

    /// <summary>
    /// 分类
    /// </summary>
    public Guid CategoryId { get; set; }

    /// <summary>
    /// 状态
    /// </summary>
    public string Status { get; set; } = null!;

    /// <summary>
    /// 描述
    /// </summary>
    public string? Description { get; set; }

    public byte[]? Image { get; set; }

    public virtual Category Category { get; set; } = null!;

    public virtual ICollection<Comment> Comments { get; set; } = new List<Comment>();

    public virtual ICollection<Interaction> Interactions { get; set; } = new List<Interaction>();

    public virtual ICollection<Order> Orders { get; set; } = new List<Order>();

    public virtual User User { get; set; } = null!;
}
